home *** CD-ROM | disk | FTP | other *** search
Java Source | 1997-02-27 | 1.5 KB | 62 lines | [TEXT/SK8 ] |
- /* SK8 © 1997 Apple Computer, Inc.
- This code is protected under the current SK8 License
- See http://sk8.research.apple.com/ for more information
- Apple Research Laboratories
- */
-
-
-
- import java.awt.*;
-
-
- public class board extends rectangle {
-
- //----------------------------------------
- //Property Definitions:
- //----------------------------------------
-
- //The currentplayer Property:
- protected player fCurrentplayer = null;
- public player currentplayer () {
- return fCurrentplayer;
- }
- /* Do the actual property access:
- */
- public Object setcurrentplayer ( player newvalue ) {
- if (this.currentplayer() != null) {
- actor curlabel = this.currentplayer().scorelabel();
- curlabel.setfillcolor(curlabel.container().fillcolor());
- curlabel.settextcolor(sk8.black);
- }
- fCurrentplayer = newvalue;
- newvalue.scorelabel().setfillcolor(sk8.black);
- newvalue.scorelabel().settextcolor(sk8.white);
- return null;
- }
-
-
- //----------------------------------------
- //Handler Definitions:
- //----------------------------------------
-
- //Initialization function
- public board() {
- super();
- actor currentContent;
- currentContent = new newgamebutton();
- currentContent.setcontainer(this);
- this.settext("SK8 Concentration");
- this.settextfont("Times");
- this.settextsize(36);
- this.settextlocation(sk8.quote("TOPCENTER"));
- }
- /* SK8 Concentration: a SK8Script version for translation to Java.
- */
- public Object mousedown ( ) {
- if (this == sk8.eventactor()) this.drag(/* IGNORED KEY: LIVE true */);
- return null;
- }
-
-
- }
-